import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
// 路由
import router from '@/router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

import { createPinia } from 'pinia'
import { registerStore } from '@/store'

const app = createApp(App)
app.use(router)
app.use(ElementPlus)

app.use(createPinia())
// 注册Pinia
registerStore()

// 全局组件注册
import myComponent from '@/components/index'
Object.keys(myComponent).forEach((key) => {
  app.component(key, myComponent[key])
})

app.mount('#app')


